package appIdeasScrumer.web;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

@Controller
public class PublicoController {
	
	@RequestMapping(value = "/index", method = RequestMethod.GET)	
	protected ModelAndView index(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		//Mensajes
		String strMensaje = request.getParameter("hddMensaje");	
		if(strMensaje == null)strMensaje="XX";
		System.out.println("strMensaje => "+strMensaje);		
		
		return new ModelAndView("publico/index","HM_MSG_ERROR",strMensaje);
	}

	@RequestMapping(value = "/contacto", method = RequestMethod.GET)	
	protected ModelAndView contacto(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		
		return new ModelAndView("publico/contacto");
	}
	

}
